package io.api.modules.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.util.StrUtil;
import io.admin.common.service.impl.CrudServiceImpl;
import io.api.modules.project.dao.MessageUserDao;
import io.api.modules.project.dto.MessageUserDTO;
import io.api.modules.project.entity.MessageUserEntity;
import io.api.modules.project.service.MessageUserService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 消息用户关联表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2024-08-01
 */
@Service
public class MessageUserServiceImpl extends CrudServiceImpl<MessageUserDao, MessageUserEntity, MessageUserDTO> implements MessageUserService {

    @Override
    public QueryWrapper<MessageUserEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<MessageUserEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }
}